In a case of obtaining a parallax from two-viewpoint images corresponding to, for example, a left eye image and a right eye image, in order to generate stereoscopic images, a matching process is performed between one image which is a criterion image and the other image which is a reference image. Specifically, pixels (corresponding pixels) on the reference image having high correlation with pixels (criterion pixels) on the criterion image are detected, and differences in positions between the criterion pixels and the corresponding pixels are detected as a parallax between the criterion image of an image displayed by the criterion pixels and the reference image.
In this case, if there is a state (occlusion) where an object which is displayed in the criterion image is blocked by a foreground-object and is not displayed in the reference image, a region (occlusion region) occurs at which corresponding pixels with respect to criterion pixels are not correctly detected. Therefore, there has been developed a technique in which the occlusion region is detected using back matching where a matching process is performed by exchanging a criterion image and a reference image, and a parallax for the detected occlusion region is estimated based on a parallax which is correctly detected in a peripheral region (for example, refer to JP-A-7-282259).